home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-18 | 3.6 KB | 83 lines | [TEXT/CWIE] |
- //
- // LTimeDateControl v1.0
- // A time and date picker for Power Plant.
- //
- // Copyright © 1995 by Michael F. Kamprath
- // mailto:kamprath@kagi.com
- // http://www.leonardo.net/kamprath/claireware.html
- //
- // Abstract
- // --------
- //
- // LTimeDateControl is a drop in module to give your Power Plant based application an
- // easy to use, graphical time and/or date picker. The user interface of LTimeDateControl
- // allows a user to click on a portion of a date and/or time string, and then change it's
- // value by clicking on an arrow or with the arrow keys.
- //
- // ConOps
- // ------
- //
- // To use, add a LControl pane to a view in your application and make it's class ID 'TmDt'.
- // Fill out it's values as you would a normal LControl with the following exceptions:
- //
- // 1. Min, Max, and Initial vlaue of the LControl is ignored. LTimeDateControl does
- // not use LControl's value tracking mechanism.
- //
- // 2. The user constant must be set to the variation of the LTimeDateControl you wish
- // to use. Variation IDs are:
- //
- // Type | ID
- // ===========================
- // Time only | 1
- // Long Date only | 2
- // Long Date & Time | 3
- // Short Date only | 4 (not supported yet in v1.0)
- // Short Date & Time | 5 (not supported yet in v1.0)
- //
- // 3. You may set a text traits ID for LTimeDateControl, but you must ensure the
- // frame you define for LTimeDateControl is at least the font's height plu 5 pixels
- // and an appropiate width to contain the date/time string plus 20 pixels in
- // width. Some expirementation will probably be needed to get the look you want.
- //
- // LTimeDateControl ignores LControl's value tracking mechanism in favor of it's
- // own. You may track a LTimeDateControl's value in either seconds (unsigned long)
- // or by a DateTimeRec. You may get the current value of LTimeDateControl with:
- //
- // Uint32 LTimeDateControl::GetDateTimeValue( void )
- // DateTimeRec LTimeDateControl::GetDateTimeRec( void )
- //
- // And set the current value with:
- //
- // void LTimeDateControl::SetDateTimeValue( const Uint32& inValue )
- // void LTimeDateControl::SetDateTimeValue( const DateTimeRec& inRec )
- //
- // When ever the user changes a LTimeDateControl value (note, not when it is
- // programatically changed), LTimeDateControl broadcasts a msg_TimeDateHasChanged
- // message (defined in LTimeDateControl.h) to any LListener's attached to the
- // LTimeDateControl. In the ioParameter of the message, the LTimeDateControl's pane
- // ID is passed.
- //
- // LTimeDateControl inherits off of LCommander (along with LControl) so that it will
- // de-hilite the currently selected date portion when it is no longer "in focus" and
- // to get keyDown messages.
- //
- // LTimeDateControl utilizes a StOffscreenGWorld so that a "smooth" redraw will be done.
- // Be sure to include the PowerPlant file "UGWorld.cp" in your project. LTimeDateControl
- // honors it's parent view's background color where appropiate (ensure that a call to
- // ApplyForeAndBackColors() will properly set it at the time of LTimeDateControl redraw).
- //
- // Be sure to also include the file LTimeDateControl.rsrc in your project. It contains
- // the control's arrow icons. Of course, you can change them to maintain your "look and feel"
- //
- // Legalisms
- // ---------
- //
- // You may freely use LTimeDateControl with the following exceptions:
- //
- // 1. If you use LTimeDateControl in your project, e-mail me so that I can keep you
- // posted when I release new versions.
- // 2. If you use LTimeDateControl in a project that you release to the public and
- // charge money for, I ask for a free & registered version of the product.
- // 3. No derivatives of LTimeDateControl may be publicly release with out my consent.
- //
-